const state = {
  current: {
    id: '',
    code: '',
    name: ''
  },    // 当前仓库
}

const getters = {
  currentWarehouse: state => state.current
}

const mutations = {
  SET_CURRENT_WAREHOUSE: (state, w) => {
    state.current = w
  }
}

const actions = {
  setCurrentWarehouse: (context, w) => context.commit('SET_CURRENT_WAREHOUSE', w)
}

export default {
  state,
  getters,
  mutations,
  actions
}
